package com.qumap.editview.impl;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.*;
import com.qumap.common.edit.IDisplay;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: 06.05.11
 * Time: 11:21
 * To change this template use File | Settings | File Templates.
 */
public class WidgetTest implements IDisplay {

	@Override
	public void setEventBus(EventBus eb) {
		//To change body of implemented methods use File | Settings | File Templates.
	}

	@Override
	public void init() {
		//To change body of implemented methods use File | Settings | File Templates.
	}

	@Override
	public void onStop() {
		//To change body of implemented methods use File | Settings | File Templates.
	}

	@Override
	public Widget asWidget() {

    // Create a Horizontal Split Panel
		SplitLayoutPanel hSplit = new SplitLayoutPanel();
		hSplit.ensureDebugId("cwHorizontalSplitPanel");
		hSplit.setSize("500px", "700px");

		   // Add some content
		String randomText = "Verrrrrrrrrrrrrrrrryyyyyyyyyyyyy longtest";
		for (int i = 0; i < 2; i++) {
		  randomText += randomText;
		}
		hSplit.addWest(new HTML(randomText),400);
		hSplit.addNorth(new HTML(randomText), 100);

		// Wrap the split panel in a decorator panel
		DecoratorPanel decPanel = new DecoratorPanel();
		decPanel.setWidget(hSplit);

		return decPanel;
	}
}
